package db.dao;

import db.dto.*;
import db.exceptions.*;

public interface PrescriptionDao
{
	/** 
	 * Inserts a new row in the PRESCRIPTION table.
	 */
	public int insert(PrescriptionDto dto) throws PrescriptionDaoException;

	/** 
	 * Updates a single row in the PRESCRIPTION table.
	 */
	public void update(int pk, PrescriptionDto dto) throws PrescriptionDaoException;

	/** 
	 * Deletes a single row in the PRESCRIPTION table.
	 */
	public void delete(int pk) throws PrescriptionDaoException;

	/** 
	 * Returns the rows from the PRESCRIPTION table that matches the specified primary-key value.
	 */
	public PrescriptionDto findByPrimaryKey(int pk) throws PrescriptionDaoException;

	/** 
	 * Returns all rows from the PRESCRIPTION table that match the criteria ''.
	 */
	public PrescriptionDto[] findAll() throws PrescriptionDaoException;

	/** 
	 * Returns all rows from the PRESCRIPTION table that match the criteria 'ID_DOCTOR = :idDoctor'.
	 */
	public PrescriptionDto[] findByDoctor(int idDoctor) throws PrescriptionDaoException;

	/** 
	 * Returns all rows from the PRESCRIPTION table that match the criteria 'ID_PATIENT = :idPatient'.
	 */
	public PrescriptionDto[] findByPatient(int idPatient) throws PrescriptionDaoException;

	/** 
	 * Returns all rows from the PRESCRIPTION table that match the criteria 'ID_PRESCRIPTION = :idPrescription'.
	 */
	public PrescriptionDto[] findWhereIdPrescriptionEquals(int idPrescription) throws PrescriptionDaoException;

	/** 
	 * Returns all rows from the PRESCRIPTION table that match the criteria 'ID_PATIENT = :idPatient'.
	 */
	public PrescriptionDto[] findWhereIdPatientEquals(int idPatient) throws PrescriptionDaoException;

	/** 
	 * Returns all rows from the PRESCRIPTION table that match the criteria 'ID_DOCTOR = :idDoctor'.
	 */
	public PrescriptionDto[] findWhereIdDoctorEquals(int idDoctor) throws PrescriptionDaoException;

	/** 
	 * Returns all rows from the PRESCRIPTION table that match the criteria 'COMMENT = :comment'.
	 */
	public PrescriptionDto[] findWhereCommentEquals(String comment) throws PrescriptionDaoException;

	/** 
	 * Sets the value of maxRows
	 */
	public void setMaxRows(int maxRows);

	/** 
	 * Gets the value of maxRows
	 */
	public int getMaxRows();

	/** 
	 * Returns all rows from the PRESCRIPTION table that match the specified arbitrary SQL statement
	 */
	public PrescriptionDto[] findByDynamicSelect(String sql, Object[] sqlParams) throws PrescriptionDaoException;

	/** 
	 * Returns all rows from the PRESCRIPTION table that match the specified arbitrary SQL statement
	 */
	public PrescriptionDto[] findByDynamicWhere(String sql, Object[] sqlParams) throws PrescriptionDaoException;

}
